package tree;

import org.junit.Test;

public class TestSkipList {

    @Test
    public void demo(){
        SkipList<String,Integer> skipList = new SkipList<>(2);
        skipList.put("1",1);
        skipList.put("1",2);
        skipList.put("2",2);
        skipList.put("3",3);
        skipList.put("5",5);
        skipList.put("9",9);
        skipList.put("4",4);
        skipList.put("11",11);
        skipList.put("18",18);
        skipList.put("20",20);


        //查找
        System.out.println(skipList.find(9,18));

        //根据索引查找
        System.out.println(skipList.get(5));

        skipList.delete(5);

        //根据索引查找
        System.out.println(skipList.get(5));
    }
}
